package com.example.algorithm.service;


import com.example.algorithm.model.ListNode;
import com.example.algorithm.model.Node;

/**
 * @auth Administrator
 * @create @2024/7/21@19:35
 * @decription
 **/
public interface ArrayListService {

    public ListNode getIntersectionNode(ListNode headA, ListNode headB);

    public ListNode reverseList(ListNode head);

    public boolean isPalindrome(ListNode head);

    public boolean hasCycle(ListNode head);

    public ListNode detectCycle(ListNode head);

    public ListNode mergeTwoLists(ListNode list1, ListNode list2);

    public ListNode addTwoNumbers(ListNode l1, ListNode l2);

    public ListNode removeNthFromEnd(ListNode head, int n);

    public ListNode swapPairs(ListNode head);

    public ListNode reverseKGroup(ListNode head, int k);

    public Node copyRandomList(Node head);

    public ListNode sortList(ListNode head);

    public ListNode mergeKLists(ListNode[] lists);


    public int[] reverseBookList(ListNode head);

}
